import store from './store'
import Vue from 'vue'
import './app.less'
import router from '@/router/index'
import * as filters from './filters' // global filters
import {isNull} from '@/utils'

store.dispatch('dict/getDicts').then(() => {
  console.log('数据字典加载成功...')
})

Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})
Vue.prototype.$Router = router
Vue.prototype.isNull = isNull

const App = new Vue({
  router,
  store,
  onShow (options) {
  },
  render(h) {
    // this.$slots.default 是将要会渲染的页面
    return h('block', this.$slots.default)
  }
})

export default App
